<?php
namespace app\api\model;
use think\Model;
class Verifycode extends Model
{
    public function index()
    {   
       
    }

    public function getUserInfo($phone)
    {    
           $data = [
              'zhuangtai'=>1,
              'mobile'=>$phone,
           ];
           return $userinfo = model('User')
                              ->field('token,username,zhanghao,jifen')
                              ->where($data)
                              ->find(); 
    }
 

    public function insertPhone($phone)
    {
       $data = [
         'zhuangtai'=>1,
          'phone'=>$phone,
       ];
       return $id=model('verifycode')->insertGetId($data);
    }
                
}





